package com.zg.paging3.activity.java;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.lifecycle.LifecycleCoroutineScope;
import androidx.recyclerview.widget.LinearLayoutManager;

import com.zg.paging3.R;
import com.zg.paging3.databinding.ActivityUseJavaBinding;

import org.jetbrains.annotations.NotNull;

import kotlin.coroutines.CoroutineContext;
import kotlinx.coroutines.CoroutineDispatcher;

public class UseJavaActivity extends AppCompatActivity {

    private ActivityUseJavaBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = DataBindingUtil.setContentView(this, R.layout.activity_use_java);
        binding.javaRv.setAdapter(new MyAdapter(new CoroutineDispatcher() {
            @Override
            public void dispatch(@NotNull CoroutineContext coroutineContext, @NotNull Runnable runnable) {

            }
        }, new CoroutineDispatcher() {
            @Override
            public void dispatch(@NotNull CoroutineContext coroutineContext, @NotNull Runnable runnable) {

            }
        }));
        binding.javaRv.setLayoutManager(new LinearLayoutManager(this));
    }
}